<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GimpProcedureConfig: GIMP 3 Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIMP 3 Library Reference Manual">
<link rel="up" href="libgimp-general.html" title="Functions not Related to Specific Images">
<link rel="prev" href="GimpSaveProcedure.html" title="GimpSaveProcedure">
<link rel="next" href="libgimp3-gimpparamspecs.html" title="gimpparamspecs">
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GimpProcedureConfig.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GimpProcedureConfig.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GimpProcedureConfig.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgimp-general.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GimpSaveProcedure.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimp3-gimpparamspecs.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GimpProcedureConfig"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GimpProcedureConfig.top_of_page"></a>GimpProcedureConfig</span></h2>
<p>GimpProcedureConfig — Config object for procedure arguments</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GimpProcedureConfig.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="returnvalue">GimpProcedure</span></a> *
</td>
<td class="function_name">
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-get-procedure" title="gimp_procedure_config_get_procedure ()">gimp_procedure_config_get_procedure</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-set-values" title="gimp_procedure_config_set_values ()">gimp_procedure_config_set_values</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-get-values" title="gimp_procedure_config_get_values ()">gimp_procedure_config_get_values</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-run" title="gimp_procedure_config_begin_run ()">gimp_procedure_config_begin_run</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-run" title="gimp_procedure_config_end_run ()">gimp_procedure_config_end_run</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpMetadata.html#GimpMetadata"><span class="returnvalue">GimpMetadata</span></a> *
</td>
<td class="function_name">
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-export" title="gimp_procedure_config_begin_export ()">gimp_procedure_config_begin_export</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-export" title="gimp_procedure_config_end_export ()">gimp_procedure_config_end_export</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GimpProcedureConfig.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type">
<a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a> *</td>
<td class="property_name"><a class="link" href="GimpProcedureConfig.html#GimpProcedureConfig--procedure" title="The “procedure” property">procedure</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GimpProcedureConfig.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GimpProcedureConfig
</pre>
</div>
<div class="refsect1">
<a name="GimpProcedureConfig.description"></a><h2>Description</h2>
<p><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> is the base class for <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a> specific
config objects and the main interface to manage aspects of
<a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s arguments such as persistency of the last used
arguments across GIMP sessions.</p>
<p>A <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> is created by a <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a> using
<a class="link" href="GimpProcedure.html#gimp-procedure-create-config" title="gimp_procedure_create_config ()"><code class="function">gimp_procedure_create_config()</code></a> and its properties match the
procedure's arguments and auxiliary arguments in number, order and
type.</p>
<p>It implements the <a href="../html/libgimpconfig3-GimpConfig.html#GimpConfig"><span class="type">GimpConfig</span></a> interface and therefore has all its
serialization and deserialization features.</p>
</div>
<div class="refsect1">
<a name="GimpProcedureConfig.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-procedure-config-get-procedure"></a><h3>gimp_procedure_config_get_procedure ()</h3>
<pre class="programlisting"><a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="returnvalue">GimpProcedure</span></a> *
gimp_procedure_config_get_procedure (<em class="parameter"><code><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> *config</code></em>);</pre>
<p>This function returns the <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a> which created <em class="parameter"><code>config</code></em>
, see
<a class="link" href="GimpProcedure.html#gimp-procedure-create-config" title="gimp_procedure_create_config ()"><code class="function">gimp_procedure_create_config()</code></a>.</p>
<div class="refsect3">
<a name="gimp-procedure-config-get-procedure.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>config</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-procedure-config-get-procedure.returns"></a><h4>Returns</h4>
<p>The <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a> which created <em class="parameter"><code>config</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-procedure-config-set-values"></a><h3>gimp_procedure_config_set_values ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_procedure_config_set_values (<em class="parameter"><code><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> *config</code></em>,
                                  <em class="parameter"><code>const <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a> *values</code></em>);</pre>
<p>Sets the values from <em class="parameter"><code>values</code></em>
 on <em class="parameter"><code>config</code></em>
's properties.</p>
<p>The number, order and types of values in <em class="parameter"><code>values</code></em>
 must match the
number, order and types of <em class="parameter"><code>config</code></em>
's properties.</p>
<p>This function is meant to be used on <em class="parameter"><code>values</code></em>
 which are passed as
arguments to the <code class="function">run()</code> function of the <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a> which created
this <em class="parameter"><code>config</code></em>
. See <a class="link" href="GimpProcedure.html#gimp-procedure-create-config" title="gimp_procedure_create_config ()"><code class="function">gimp_procedure_create_config()</code></a>.</p>
<div class="refsect3">
<a name="gimp-procedure-config-set-values.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>config</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>values</p></td>
<td class="parameter_description"><p>a <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-procedure-config-get-values"></a><h3>gimp_procedure_config_get_values ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_procedure_config_get_values (<em class="parameter"><code><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> *config</code></em>,
                                  <em class="parameter"><code><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a> *values</code></em>);</pre>
<p>Gets the values from <em class="parameter"><code>config</code></em>
's properties and stores them in
<em class="parameter"><code>values</code></em>
.</p>
<p>See <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-set-values" title="gimp_procedure_config_set_values ()"><code class="function">gimp_procedure_config_set_values()</code></a>.</p>
<div class="refsect3">
<a name="gimp-procedure-config-get-values.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>config</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>values</p></td>
<td class="parameter_description"><p>a <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-procedure-config-begin-run"></a><h3>gimp_procedure_config_begin_run ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_procedure_config_begin_run (<em class="parameter"><code><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> *config</code></em>,
                                 <em class="parameter"><code><a class="link" href="GimpImage.html" title="gimpimage"><span class="type">GimpImage</span></a> *image</code></em>,
                                 <em class="parameter"><code><a href="../html/libgimpbase3-gimpbaseenums.html#GimpRunMode"><span class="type">GimpRunMode</span></a> run_mode</code></em>,
                                 <em class="parameter"><code>const <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a> *args</code></em>);</pre>
<p>Populates <em class="parameter"><code>config</code></em>
 with values for a <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s <code class="function">run()</code>,
depending on <em class="parameter"><code>run_mode</code></em>
.</p>
<p>If <em class="parameter"><code>run_mode</code></em>
 is <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-INTERACTIVE:CAPS"><code class="literal">GIMP_RUN_INTERACTIVE</code></a> or <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-WITH-LAST-VALS:CAPS"><code class="literal">GIMP_RUN_WITH_LAST_VALS</code></a>,
the saved values from the procedure's last <code class="function">run()</code> are loaded and set
on <em class="parameter"><code>config</code></em>
. If <em class="parameter"><code>image</code></em>
 is not <code class="literal">NULL</code>, the last used values for this
image are tried first, and if no image-spesicic values are found
the globally saved last used values are used. If no saved last used
values are found, the procedure's default argument values are used.</p>
<p>If <em class="parameter"><code>run_mode</code></em>
 is <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-NONINTERACTIVE:CAPS"><code class="literal">GIMP_RUN_NONINTERACTIVE</code></a>, the contents of <em class="parameter"><code>args</code></em>
 are
set on <em class="parameter"><code>config</code></em>
 using <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-set-values" title="gimp_procedure_config_set_values ()"><code class="function">gimp_procedure_config_set_values()</code></a>.</p>
<p>After setting <em class="parameter"><code>config</code></em>
's properties like described above, arguments
and auxiliary arguments are automatically synced from image
parasites of the same name if they were set to
<code class="literal">GIMP_ARGUMENT_SYNC_PARASITE</code> with
<code class="function">gimp_procedure_set_argument_sync()</code>:</p>
<p>String properties are set to the value of the image parasite if
<em class="parameter"><code>run_mode</code></em>
 is <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-INTERACTIVE:CAPS"><code class="literal">GIMP_RUN_INTERACTIVE</code></a> or <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-WITH-LAST-VALS:CAPS"><code class="literal">GIMP_RUN_WITH_LAST_VALS</code></a>, or
if the corresponding argument is an auxiliary argument. As a
special case, a propery named "gimp-comment" will default to
<a class="link" href="libgimp3-gimpgimprc.html#gimp-get-default-comment" title="gimp_get_default_comment ()"><code class="function">gimp_get_default_comment()</code></a> if there is no "gimp-comment" parasite.</p>
<p>After calling this function, the <em class="parameter"><code>args</code></em>
 passed to <code class="function">run()</code> should be
left alone and <em class="parameter"><code>config</code></em>
 be treated as the procedure's arguments.</p>
<p>It is possible to get <em class="parameter"><code>config</code></em>
's resulting values back into <em class="parameter"><code>args</code></em>
 by
calling <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-get-values" title="gimp_procedure_config_get_values ()"><code class="function">gimp_procedure_config_get_values()</code></a>, as long as modified
<em class="parameter"><code>args</code></em>
 are written back to <em class="parameter"><code>config</code></em>
 using
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-set-values" title="gimp_procedure_config_set_values ()"><code class="function">gimp_procedure_config_set_values()</code></a> before the call to
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-run" title="gimp_procedure_config_end_run ()"><code class="function">gimp_procedure_config_end_run()</code></a>.</p>
<p>This function should be used at the beginning of a procedure's
<code class="function">run()</code> and be paired with a call to <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-run" title="gimp_procedure_config_end_run ()"><code class="function">gimp_procedure_config_end_run()</code></a>
at the end of <code class="function">run()</code>.</p>
<div class="refsect3">
<a name="gimp-procedure-config-begin-run.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>config</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>image</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpImage.html" title="gimpimage"><span class="type">GimpImage</span></a> or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>run_mode</p></td>
<td class="parameter_description"><p>the <a href="../html/libgimpbase3-gimpbaseenums.html#GimpRunMode"><span class="type">GimpRunMode</span></a> passed to a <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s <code class="function">run()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>args</p></td>
<td class="parameter_description"><p>the <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a> passed to a <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s <code class="function">run()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-procedure-config-end-run"></a><h3>gimp_procedure_config_end_run ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_procedure_config_end_run (<em class="parameter"><code><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> *config</code></em>,
                               <em class="parameter"><code><a href="../html/libgimpbase3-gimpbaseenums.html#GimpPDBStatusType"><span class="type">GimpPDBStatusType</span></a> status</code></em>);</pre>
<p>This function is the counterpart of
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-run" title="gimp_procedure_config_begin_run ()"><code class="function">gimp_procedure_config_begin_run()</code></a> and must always be called in
pairs in a procedure's <code class="function">run()</code>, before returning return values.</p>
<p>If the <em class="parameter"><code>run_mode</code></em>
 passed to <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-run" title="gimp_procedure_config_end_run ()"><code class="function">gimp_procedure_config_end_run()</code></a> was
<a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-INTERACTIVE:CAPS"><code class="literal">GIMP_RUN_INTERACTIVE</code></a>, <em class="parameter"><code>config</code></em>
 is saved as last used values to be
used when the procedure runs again. Additionally, the <em class="parameter"><code>image</code></em>
 passed
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-run" title="gimp_procedure_config_begin_run ()"><code class="function">gimp_procedure_config_begin_run()</code></a> was not <code class="literal">NULL</code>, <em class="parameter"><code>config</code></em>
 is
attached to <em class="parameter"><code>image</code></em>
 as last used values for this image using a
<a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpParasite.html#GimpParasite"><span class="type">GimpParasite</span></a> and <a class="link" href="GimpImage.html#gimp-image-attach-parasite" title="gimp_image_attach_parasite ()"><code class="function">gimp_image_attach_parasite()</code></a>.</p>
<p>If <em class="parameter"><code>run_mode</code></em>
 was not <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-NONINTERACTIVE:CAPS"><code class="literal">GIMP_RUN_NONINTERACTIVE</code></a>, this function also
conveniently calls <a class="link" href="GimpDisplay.html#gimp-displays-flush" title="gimp_displays_flush ()"><code class="function">gimp_displays_flush()</code></a>, which is what most
procedures want and doesn't do any harm if called redundantly.</p>
<p>After a <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-RUN-INTERACTIVE:CAPS"><code class="literal">GIMP_RUN_INTERACTIVE</code></a> run, <code class="literal">GIMP_ARGUMENT_SYNC_PARASITE</code>
values that have been changed are written back to their
corresponding image parasite.</p>
<p>See <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-run" title="gimp_procedure_config_begin_run ()"><code class="function">gimp_procedure_config_begin_run()</code></a>.</p>
<div class="refsect3">
<a name="gimp-procedure-config-end-run.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>config</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>status</p></td>
<td class="parameter_description"><p>the return status of the <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s <code class="function">run()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-procedure-config-begin-export"></a><h3>gimp_procedure_config_begin_export ()</h3>
<pre class="programlisting"><a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpMetadata.html#GimpMetadata"><span class="returnvalue">GimpMetadata</span></a> *
gimp_procedure_config_begin_export (<em class="parameter"><code><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> *config</code></em>,
                                    <em class="parameter"><code><a class="link" href="GimpImage.html" title="gimpimage"><span class="type">GimpImage</span></a> *original_image</code></em>,
                                    <em class="parameter"><code><a href="../html/libgimpbase3-gimpbaseenums.html#GimpRunMode"><span class="type">GimpRunMode</span></a> run_mode</code></em>,
                                    <em class="parameter"><code>const <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a> *args</code></em>,
                                    <em class="parameter"><code>const <span class="type">gchar</span> *mime_type</code></em>);</pre>
<p>This is a variant of <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-run" title="gimp_procedure_config_begin_run ()"><code class="function">gimp_procedure_config_begin_run()</code></a> to be used
by file export procedures using <a class="link" href="GimpSaveProcedure.html" title="GimpSaveProcedure"><span class="type">GimpSaveProcedure</span></a>. It must be
paired with a call to <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-export" title="gimp_procedure_config_end_export ()"><code class="function">gimp_procedure_config_end_export()</code></a> at the end
of <code class="function">run()</code>.</p>
<p>It does everything <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-run" title="gimp_procedure_config_begin_run ()"><code class="function">gimp_procedure_config_begin_run()</code></a> does but
provides additional features to automate file export:</p>
<p>If <em class="parameter"><code>mime_type</code></em>
 is non-<code class="literal">NULL</code>, exporting metadata is handled
automatically, by calling <a class="link" href="libgimp3-gimpmetadata.html#gimp-image-metadata-save-prepare" title="gimp_image_metadata_save_prepare ()"><code class="function">gimp_image_metadata_save_prepare()</code></a> and
syncing its returned <a href="../html/GimpMetadata.html#GimpMetadataSaveFlags"><span class="type">GimpMetadataSaveFlags</span></a> with <em class="parameter"><code>config</code></em>
's
properties. (The corresponding <a class="link" href="libgimp3-gimpmetadata.html#gimp-image-metadata-save-finish" title="gimp_image_metadata_save_finish ()"><code class="function">gimp_image_metadata_save_finish()</code></a>
will be called by <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-export" title="gimp_procedure_config_end_export ()"><code class="function">gimp_procedure_config_end_export()</code></a>).</p>
<p>The following boolean arguments of the used <a class="link" href="GimpSaveProcedure.html" title="GimpSaveProcedure"><span class="type">GimpSaveProcedure</span></a> are
synced. The procedure can but must not provide these arguments.</p>
<p>"save-exif" for <a href="../html/GimpMetadata.html#GIMP-METADATA-SAVE-EXIF:CAPS"><code class="literal">GIMP_METADATA_SAVE_EXIF</code></a>.</p>
<p>"save-xmp" for <a href="../html/GimpMetadata.html#GIMP-METADATA-SAVE-XMP:CAPS"><code class="literal">GIMP_METADATA_SAVE_XMP</code></a>.</p>
<p>"save-iptc" for <a href="../html/GimpMetadata.html#GIMP-METADATA-SAVE-IPTC:CAPS"><code class="literal">GIMP_METADATA_SAVE_IPTC</code></a>.</p>
<p>"save-thumbnail" for <a href="../html/GimpMetadata.html#GIMP-METADATA-SAVE-THUMBNAIL:CAPS"><code class="literal">GIMP_METADATA_SAVE_THUMBNAIL</code></a>.</p>
<p>"save-color-profile" for <a href="../html/GimpMetadata.html#GIMP-METADATA-SAVE-COLOR-PROFILE:CAPS"><code class="literal">GIMP_METADATA_SAVE_COLOR_PROFILE</code></a>.</p>
<p>"save-comment" for <a href="../html/GimpMetadata.html#GIMP-METADATA-SAVE-COMMENT:CAPS"><code class="literal">GIMP_METADATA_SAVE_COMMENT</code></a>.</p>
<p>The values from the <a href="../html/GimpMetadata.html#GimpMetadataSaveFlags"><span class="type">GimpMetadataSaveFlags</span></a> will only ever be used
to set these properties to <code class="literal">FALSE</code>, overriding the user's saved
default values for the procedure, but NOT overriding the last used
values from exporting <em class="parameter"><code>original_image</code></em>
 or the last used values from
exporting any other image using this procedure.</p>
<p>If <em class="parameter"><code>mime_type</code></em>
 is <code class="literal">NULL</code>, <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpMetadata.html#GimpMetadata"><span class="type">GimpMetadata</span></a> handling is skipped. The
procedure can still have all of the above listed boolean arguments,
but must take care of their default values itself. The easiest way
to do this is by simply using <a class="link" href="libgimp3-Gimp.html#gimp-export-comment" title="gimp_export_comment ()"><code class="function">gimp_export_comment()</code></a>,
<a class="link" href="libgimp3-Gimp.html#gimp-export-exif" title="gimp_export_exif ()"><code class="function">gimp_export_exif()</code></a> etc. as default values for these arguments when
adding them using <a class="link" href="libgimp3-GimpProcedure-params.html#GIMP-PROC-ARG-BOOLEAN:CAPS" title="GIMP_PROC_ARG_BOOLEAN()"><code class="function">GIMP_PROC_ARG_BOOLEAN()</code></a> or
<a class="link" href="libgimp3-GimpProcedure-params.html#GIMP-PROC-AUX-ARG-BOOLEAN:CAPS" title="GIMP_PROC_AUX_ARG_BOOLEAN()"><code class="function">GIMP_PROC_AUX_ARG_BOOLEAN()</code></a>.</p>
<div class="refsect3">
<a name="gimp-procedure-config-begin-export.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>config</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>original_image</p></td>
<td class="parameter_description"><p>the <a class="link" href="GimpImage.html" title="gimpimage"><span class="type">GimpImage</span></a> passed to <code class="function">run()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>run_mode</p></td>
<td class="parameter_description"><p>the <a href="../html/libgimpbase3-gimpbaseenums.html#GimpRunMode"><span class="type">GimpRunMode</span></a> passed to a <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s <code class="function">run()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>args</p></td>
<td class="parameter_description"><p>the <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpValueArray.html#GimpValueArray"><span class="type">GimpValueArray</span></a> passed to a <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s <code class="function">run()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mime_type</p></td>
<td class="parameter_description"><p>exported file format's mime type, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-procedure-config-begin-export.returns"></a><h4>Returns</h4>
<p>The <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpMetadata.html#GimpMetadata"><span class="type">GimpMetadata</span></a> to be used
for this export, or <code class="literal">NULL</code> if <em class="parameter"><code>original_image</code></em>
doesn't have
metadata. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-procedure-config-end-export"></a><h3>gimp_procedure_config_end_export ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_procedure_config_end_export (<em class="parameter"><code><a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a> *config</code></em>,
                                  <em class="parameter"><code><a class="link" href="GimpImage.html" title="gimpimage"><span class="type">GimpImage</span></a> *exported_image</code></em>,
                                  <em class="parameter"><code><span class="type">GFile</span> *file</code></em>,
                                  <em class="parameter"><code><a href="../html/libgimpbase3-gimpbaseenums.html#GimpPDBStatusType"><span class="type">GimpPDBStatusType</span></a> status</code></em>);</pre>
<p>This is a variant of <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-end-run" title="gimp_procedure_config_end_run ()"><code class="function">gimp_procedure_config_end_run()</code></a> to be used by
file export procedures using <a class="link" href="GimpSaveProcedure.html" title="GimpSaveProcedure"><span class="type">GimpSaveProcedure</span></a>. It must be paired
with a call to <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-export" title="gimp_procedure_config_begin_export ()"><code class="function">gimp_procedure_config_begin_export()</code></a> at the
beginning of <code class="function">run()</code>.</p>
<p>It does everything <a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-run" title="gimp_procedure_config_begin_run ()"><code class="function">gimp_procedure_config_begin_run()</code></a> does but
provides additional features to automate file export:</p>
<p>If <em class="parameter"><code>status</code></em>
 is <a href="../html/libgimpbase3-gimpbaseenums.html#GIMP-PDB-SUCCESS:CAPS"><code class="literal">GIMP_PDB_SUCCESS</code></a>, and
<a class="link" href="GimpProcedureConfig.html#gimp-procedure-config-begin-export" title="gimp_procedure_config_begin_export ()"><code class="function">gimp_procedure_config_begin_export()</code></a> returned a <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-GimpMetadata.html#GimpMetadata"><span class="type">GimpMetadata</span></a>, this
function calls <code class="function">gimp_procedure_config_save_metadata()</code>, which syncs
back <em class="parameter"><code>config</code></em>
's export properties to the metadata's
<a href="../html/GimpMetadata.html#GimpMetadataSaveFlags"><span class="type">GimpMetadataSaveFlags</span></a> and writes metadata to <em class="parameter"><code>file</code></em>
 using
<a class="link" href="libgimp3-gimpmetadata.html#gimp-image-metadata-save-finish" title="gimp_image_metadata_save_finish ()"><code class="function">gimp_image_metadata_save_finish()</code></a>.</p>
<div class="refsect3">
<a name="gimp-procedure-config-end-export.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>config</p></td>
<td class="parameter_description"><p>a <a class="link" href="GimpProcedureConfig.html" title="GimpProcedureConfig"><span class="type">GimpProcedureConfig</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>exported_image</p></td>
<td class="parameter_description"><p>the <a class="link" href="GimpImage.html" title="gimpimage"><span class="type">GimpImage</span></a> that was actually exported</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p>the <span class="type">GFile</span> <em class="parameter"><code>exported_image</code></em>
was written to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>status</p></td>
<td class="parameter_description"><p>the return status of the <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a>'s <code class="function">run()</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="GimpProcedureConfig.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GimpProcedureConfig--procedure"></a><h3>The <code class="literal">“procedure”</code> property</h3>
<pre class="programlisting">  “procedure”                <a class="link" href="GimpProcedure.html" title="GimpProcedure"><span class="type">GimpProcedure</span></a> *</pre>
<p>The procedure this config object is used for.</p>
<p>Owner: GimpProcedureConfig</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.0</div>
</body>
</html>